<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<link type="text/css" rel="stylesheet" href="/css/redmond/jquery-ui.min.css" />
<link rel="stylesheet" type="text/css" href="/css/jscal2.css" />
<link type="text/css" rel="stylesheet" href="/css/jTree.css" />
<link type="text/css" rel="stylesheet" href="/css/public.css" />
<link type="text/css" rel="stylesheet" href="/css/index.css" />
<script type="text/javascript" src="/scripts/jquery.js"></script>
<script type="text/javascript" src="/scripts/jquery-ui.js"></script>
<script type="text/javascript" src="/scripts/jscal2.js"></script>
<script type="text/javascript" src="/scripts/zh.js"></script>
<script type="text/javascript" src="/scripts/xheditor.js"></script>
<script type="text/javascript" src="/scripts/xheditor_lang/zh-cn.js"></script>
<script type="text/javascript" src="/scripts/ajaxfileupload.js"></script>
<script type="text/javascript" src="/scripts/jTree.js"></script>
<script type="text/javascript" src="/scripts/login2.js"></script>
<script type="text/javascript" src="/scripts/public.js"></script>
<script type="text/javascript">
$(document).ready(function(e) {
	$(window).resize(function(e) {
		setSize();
	});
	setSize();
	$(window).scroll(function(e) {
        setSize2();
    });
	$('.tip').show();
    $('.content .tip').click(function(e) {
		var speed=600;
		var x=Math.round($('.leftpanel').offset().leftpanel);
		var mainx='1293px';
		if($('.leftpanel *').children().is(':hidden')){
			x+=183;
			mainx='1110px';
			$('.main').animate({width:mainx},speed);
			$('.leftpanel').children().delay(40).toggle(speed);
			$('.tip').delay(40).animate({left:x+'px'},speed);
		}else{
			$('.leftpanel').children().toggle(speed);
			$('.main').animate({width:mainx},speed);
			$('.tip').animate({left:x+'px'},speed);
		}
    });
	showtime($('.head .nav .time'));
	setInterval("showtime($('.head .nav .time'))",1000);
	$('.head .menu .item').click(function(e) {
        $('.head .menu .chose').removeClass('chose');
		$(this).addClass('chose');
		if($('.leftpanel *').children().is(':hidden')){
			$('.content .tip').trigger('click');
		}
    });
});
function setSize(){
	var h=$(window).height()-$('.head').outerHeight()-$('.footpanel').outerHeight();
	h=h<400?400:h;
	$('.content').css('minHeight',h+'px');
	$('.leftpanel').css('minHeight',h+'px');
	$('.main').css('minHeight',h+'px');
	var x,y;
	var linediv=$('.leftpanel').offset();
	x=Math.round(linediv.leftpanel)+$('.leftpanel').outerWidth();
	var bodyh=$('body').height();
	var windowh=window.innerHeight;
	if(bodyh>windowh){
		y=Math.floor(windowh/2)
	}else{
		y=Math.floor(bodyh/2)
	}
	$('.tip').css({left:x+'px',top:y+'px'});
}
function setSize2(){
	var mh=$('.content .leftpanel').css('minHeight');
	mh=Number(mh.substr(0,mh.length-2));
	var mainh=$('.content .main').height();
	if(mh<mainh){
		$('.content .leftpanel').height(mainh);
	}else{
		$('.content .leftpanel').height(mh);
		$('.content .main').css('minHeight',mh+'px');
	}
//	$('.leftpanel').css('minHeight',h+'px');
//	$('.main').css('minHeight',h+'px');
}
</script>
</head>
<body>
<div class="login">
  <p>用户名：
    <input type="text" name="managername" id="managername" autofocus />
  </p>
  <p>密　码：
    <input type="password" name="passwd" id="passwd" />
  </p>
  <p>验证码：
    <input type="text" name="vcode" id="vcode" class="vcode" maxlength="4" />
    <img src="/validateCode" alt="验证码" title="点击刷新验证码" onClick="fleshvcode()" id="vcodeimg" /> </p>
  <p>
    <button onClick="login()">登　录</button>
    <button onClick="login_reset()">重　置</button>
  </p>
</div>
<div class="contain">
  <div class="head">
    <div class="top">
      <h2>后台管理系统</h2>
    </div>
    <div class="menu">
      <ul>
		<#list menu0 as menu>
          <li class="item" onClick="goPage('${menu.url}','.leftpanel')"><span><img src="/images/menu_user.png" />${menu.names}</span></li>
		  <#if menu_has_next><li class="line"></li></#if>
		</#list>
       <!-- <li class="item"><span><img src="/images/menu_user.png" /> 用　户</span></li>
        <li class="line"></li>
        <li class="item"><span><img src="/images/menu_edit.png" />内容编辑</span></li>
        <li class="line"></li>
        <li class="item"><span><img src="/images/menu_system.png" /> 系　统</span></li>
        <li class="line"></li>
        <li class="item"><span><img src="/images/menu_file.png" /> 文　件</span></li>-->
      </ul>
    </div>
    <div class="nav">
      <div class="item"><a href="javascript:void(0)">网站前台</a></div>
      <div class="item"><a href="javascript:void(0)">退出系统</a></div>
      <div class="time">时间</div>
    </div>
  </div>
  <div class="content">
    <img class="tip" src="/images/left_line_tip.png" title="隐藏/显示左侧菜单" /> 
    <div class="leftpanel">
      <#include "leftMenu.html"></div>
    <div class="main" id="main"></div>
    <div class="clear"></div>
  </div>
  <div class="footpanel">
    <div class="foot">版权信息：xxx公司版权所有 </div>
  </div>
</div>
</body>
</html>
